from flask import Blueprint
from app.services.redis_service import redis_set, redis_get, redis_delete, redis_set_with_expiry

redis_bp = Blueprint('redis', __name__)


@redis_bp.route('/set/<key>/<value>')
def redis_set_route(key, value):
    return redis_set(key, value)


@redis_bp.route('/get/<key>')
def redis_get_route(key):
    return redis_get(key)


@redis_bp.route('/delete/<key>')
def redis_delete_route(key):
    return redis_delete(key)


@redis_bp.route('/set_with_expiry/<key>/<value>/<seconds>')
def redis_set_with_expiry_route(key, value, seconds):
    return redis_set_with_expiry(key, value, seconds)
    